export const shuffle = <T>(array: T[]): T[] => {
	const cardsToShuffle = array.slice();
	for (let i = cardsToShuffle.length - 1; i > 0; i--) {
		const j = Math.floor(Math.random() * (i + 1));
		[cardsToShuffle[i], cardsToShuffle[j]] = [cardsToShuffle[j], cardsToShuffle[i]];
	}
	return cardsToShuffle;
};
